package com.zhixue.learning.service;

import com.zhixue.base.model.PageResult;
import com.zhixue.content.model.po.CoursePublish;
import com.zhixue.learning.model.dto.MyCourseTableParams;
import com.zhixue.learning.model.dto.ZxChooseCourseDto;
import com.zhixue.learning.model.dto.ZxCourseTablesDto;
import com.zhixue.learning.model.po.ZxChooseCourse;
import com.zhixue.learning.model.po.ZxCourseTables;

/**
 * @author Dragon
 * @description MyCourseTablesService
 * @date 2023/10/22 15:07
 */
public interface MyCourseTablesService {


    /**
     * 添加选课
     * @param userId
     * @param courseId
     * @return
     */
    ZxChooseCourseDto addChooseCourse(String userId, Long courseId);


    /**
     * 查询学习资格
     * @param userId
     * @param courseId
     * @return
     */
    ZxCourseTablesDto getLearningStatus(String userId, Long courseId);


    /**
     * 我的课程表
     * @param params
     * @return
     */
    PageResult<ZxCourseTables> myCourseTables(MyCourseTableParams params);


    /**
     * 将免费课程添加到选课表
     * @param userId
     * @param coursePublish
     * @return
     */
    ZxChooseCourse addFreeCourse(String userId, CoursePublish coursePublish);


    /**
     * 将付费课程加入到选课表
     * @param userId
     * @param coursePublish
     * @return
     */
    ZxChooseCourse addChargeCourse(String userId, CoursePublish coursePublish);


    /**
     * 保存付费课程的选课状态为成功
     * @param chooseCourseId
     * @return
     */
    boolean saveChooseCourseStatus(String chooseCourseId);



}
